/*! For license information please see bundle.js.LICENSE.txt */ !(function(
    e,
    t
) {
    "object" == typeof exports && "object" == typeof module ?
        (module.exports = t(require("WasmPlayer"))) :
        "function" == typeof define && define.amd ?
        define(["WasmPlayer"], t) :
        "object" == typeof exports ?
        (exports.Api = t(require("WasmPlayer"))) :
        (e.Api = t(e.WasmPlayer));
})(self, function(e) {
    return (() => {
        "use strict";
        var t = {
                35: (e, t, n) => {
                    Object.defineProperty(t, "__esModule", {
                            value: !0,
                        }),
                        (t.getPlayAddress =
                            t.heartBeat =
                            t.getDevicesStatus =
                            t.getDeviceList =
                            t.loginOut =
                            t.login =
                            void 0);
                    var o,
                        r =
                        (o = n(278)) && o.__esModule ?
                        o : {
                            default: o,
                        };
                    (t.login = function(e) {
                        return (0, r.default)({
                            url: "https://applet.av380.net/video/custom/login",
                            method: "post",
                            data: e,
                        });
                    }),
                    (t.loginOut = function(e) {
                        return (0, r.default)({
                            url: "https://applet.av380.net/video/custom/login-out",
                            method: "post",
                            data: e,
                        });
                    }),
                    (t.getDeviceList = function(e) {
                        return (0, r.default)({
                            url: "https://applet.av380.net/video/custom/get-device-list",
                            method: "get",
                            params: e,
                        });
                    }),
                    (t.getDevicesStatus = function(e, t) {
                        return (0, r.default)({
                            url: t,
                            method: "post",
                            data: e,
                        });
                    }),
                    (t.heartBeat = function(e, t) {
                        return (0, r.default)({
                            url: t,
                            method: "post",
                            data: e,
                        });
                    }),
                    (t.getPlayAddress = function(e) {
                        return (0, r.default)({
                            url: "https://applet.av380.net/video/custom/get-play-address",
                            method: "post",
                            data: e,
                        });
                    });
                },
                111: (e, t, n) => {
                    var o, r, i, s;

                    function a(e) {
                        return (a =
                            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ?

                            function(e) {
                                return typeof e;
                            } :
                            function(e) {
                                return e &&
                                    "function" == typeof Symbol &&
                                    e.constructor === Symbol &&
                                    e !== Symbol.prototype ?
                                    "symbol" :
                                    typeof e;
                            })(e);
                    }
                    (e = n.nmd(e)),
                    (s = function() {
                        return (function(e) {
                            function t(o) {
                                if (n[o]) return n[o].exports;
                                var r = (n[o] = {
                                    exports: {},
                                    id: o,
                                    loaded: !1,
                                });
                                return (
                                    e[o].call(r.exports, r, r.exports, t),
                                    (r.loaded = !0),
                                    r.exports
                                );
                            }
                            var n = {};
                            return (t.m = e), (t.c = n), (t.p = ""), t(0);
                        })([
                            function(e, t, n) {
                                e.exports = n(1);
                            },
                            function(e, t, n) {
                                function o(e) {
                                    var t = new s(e),
                                        n = i(s.prototype.request, t);
                                    return r.extend(n, s.prototype, t), r.extend(n, t), n;
                                }
                                var r = n(2),
                                    i = n(3),
                                    s = n(5),
                                    a = n(22),
                                    u = o(n(11));
                                (u.Axios = s),
                                (u.create = function(e) {
                                    return o(a(u.defaults, e));
                                }),
                                (u.Cancel = n(23)),
                                (u.CancelToken = n(24)),
                                (u.isCancel = n(10)),
                                (u.all = function(e) {
                                    return Promise.all(e);
                                }),
                                (u.spread = n(25)),
                                (e.exports = u),
                                (e.exports.default = u);
                            },
                            function(e, t, n) {
                                function o(e) {
                                    return "[object Array]" === f.call(e);
                                }

                                function r(e) {
                                    return null !== e && "object" == a(e);
                                }

                                function i(e) {
                                    return "[object Function]" === f.call(e);
                                }

                                function s(e, t) {
                                    if (null != e)
                                        if (("object" != a(e) && (e = [e]), o(e)))
                                            for (var n = 0, r = e.length; n < r; n++)
                                                t.call(null, e[n], n, e);
                                        else
                                            for (var i in e)
                                                Object.prototype.hasOwnProperty.call(e, i) &&
                                                t.call(null, e[i], i, e);
                                }
                                var u = n(3),
                                    c = n(4),
                                    f = Object.prototype.toString;
                                e.exports = {
                                    isArray: o,
                                    isArrayBuffer: function(e) {
                                        return "[object ArrayBuffer]" === f.call(e);
                                    },
                                    isBuffer: c,
                                    isFormData: function(e) {
                                        return (
                                            "undefined" != typeof FormData && e instanceof FormData
                                        );
                                    },
                                    isArrayBufferView: function(e) {
                                        return "undefined" != typeof ArrayBuffer &&
                                            ArrayBuffer.isView ?
                                            ArrayBuffer.isView(e) :
                                            e && e.buffer && e.buffer instanceof ArrayBuffer;
                                    },
                                    isString: function(e) {
                                        return "string" == typeof e;
                                    },
                                    isNumber: function(e) {
                                        return "number" == typeof e;
                                    },
                                    isObject: r,
                                    isUndefined: function(e) {
                                        return void 0 === e;
                                    },
                                    isDate: function(e) {
                                        return "[object Date]" === f.call(e);
                                    },
                                    isFile: function(e) {
                                        return "[object File]" === f.call(e);
                                    },
                                    isBlob: function(e) {
                                        return "[object Blob]" === f.call(e);
                                    },
                                    isFunction: i,
                                    isStream: function(e) {
                                        return r(e) && i(e.pipe);
                                    },
                                    isURLSearchParams: function(e) {
                                        return (
                                            "undefined" != typeof URLSearchParams &&
                                            e instanceof URLSearchParams
                                        );
                                    },
                                    isStandardBrowserEnv: function() {
                                        return (
                                            ("undefined" == typeof navigator ||
                                                ("ReactNative" !== navigator.product &&
                                                    "NativeScript" !== navigator.product &&
                                                    "NS" !== navigator.product)) &&
                                            "undefined" != typeof window &&
                                            "undefined" != typeof document
                                        );
                                    },
                                    forEach: s,
                                    merge: function e() {
                                        function t(t, o) {
                                            "object" == a(n[o]) && "object" == a(t) ?
                                                (n[o] = e(n[o], t)) :
                                                (n[o] = t);
                                        }
                                        for (var n = {}, o = 0, r = arguments.length; o < r; o++)
                                            s(arguments[o], t);
                                        return n;
                                    },
                                    deepMerge: function e() {
                                        function t(t, o) {
                                            "object" == a(n[o]) && "object" == a(t) ?
                                                (n[o] = e(n[o], t)) :
                                                "object" == a(t) ?
                                                (n[o] = e({}, t)) :
                                                (n[o] = t);
                                        }
                                        for (var n = {}, o = 0, r = arguments.length; o < r; o++)
                                            s(arguments[o], t);
                                        return n;
                                    },
                                    extend: function(e, t, n) {
                                        return (
                                            s(t, function(t, o) {
                                                e[o] = n && "function" == typeof t ? u(t, n) : t;
                                            }),
                                            e
                                        );
                                    },
                                    trim: function(e) {
                                        return e.replace(/^\s*/, "").replace(/\s*$/, "");
                                    },
                                };
                            },
                            function(e, t) {
                                e.exports = function(e, t) {
                                    return function() {
                                        for (
                                            var n = new Array(arguments.length), o = 0; o < n.length; o++
                                        )
                                            n[o] = arguments[o];
                                        return e.apply(t, n);
                                    };
                                };
                            },
                            function(e, t) {
                                e.exports = function(e) {
                                    return (
                                        null != e &&
                                        null != e.constructor &&
                                        "function" == typeof e.constructor.isBuffer &&
                                        e.constructor.isBuffer(e)
                                    );
                                };
                            },
                            function(e, t, n) {
                                function o(e) {
                                    (this.defaults = e),
                                    (this.interceptors = {
                                        request: new s(),
                                        response: new s(),
                                    });
                                }
                                var r = n(2),
                                    i = n(6),
                                    s = n(7),
                                    a = n(8),
                                    u = n(22);
                                (o.prototype.request = function(e) {
                                    "string" == typeof e
                                        ?
                                        ((e = arguments[1] || {}).url = arguments[0]) :
                                        (e = e || {}),
                                        ((e = u(this.defaults, e)).method = e.method ?
                                            e.method.toLowerCase() :
                                            "get");
                                    var t = [a, void 0],
                                        n = Promise.resolve(e);
                                    for (
                                        this.interceptors.request.forEach(function(e) {
                                            t.unshift(e.fulfilled, e.rejected);
                                        }),
                                        this.interceptors.response.forEach(function(e) {
                                            t.push(e.fulfilled, e.rejected);
                                        }); t.length;

                                    )
                                        n = n.then(t.shift(), t.shift());
                                    return n;
                                }),
                                (o.prototype.getUri = function(e) {
                                    return (
                                        (e = u(this.defaults, e)),
                                        i(e.url, e.params, e.paramsSerializer).replace(
                                            /^\?/,
                                            ""
                                        )
                                    );
                                }),
                                r.forEach(
                                        ["delete", "get", "head", "options"],
                                        function(e) {
                                            o.prototype[e] = function(t, n) {
                                                return this.request(
                                                    r.merge(n || {}, {
                                                        method: e,
                                                        url: t,
                                                    })
                                                );
                                            };
                                        }
                                    ),
                                    r.forEach(["post", "put", "patch"], function(e) {
                                        o.prototype[e] = function(t, n, o) {
                                            return this.request(
                                                r.merge(o || {}, {
                                                    method: e,
                                                    url: t,
                                                    data: n,
                                                })
                                            );
                                        };
                                    }),
                                    (e.exports = o);
                            },
                            function(e, t, n) {
                                function o(e) {
                                    return encodeURIComponent(e)
                                        .replace(/%40/gi, "@")
                                        .replace(/%3A/gi, ":")
                                        .replace(/%24/g, "$")
                                        .replace(/%2C/gi, ",")
                                        .replace(/%20/g, "+")
                                        .replace(/%5B/gi, "[")
                                        .replace(/%5D/gi, "]");
                                }
                                var r = n(2);
                                e.exports = function(e, t, n) {
                                    if (!t) return e;
                                    var i;
                                    if (n) i = n(t);
                                    else if (r.isURLSearchParams(t)) i = t.toString();
                                    else {
                                        var s = [];
                                        r.forEach(t, function(e, t) {
                                                null != e &&
                                                    (r.isArray(e) ? (t += "[]") : (e = [e]),
                                                        r.forEach(e, function(e) {
                                                            r.isDate(e) ?
                                                                (e = e.toISOString()) :
                                                                r.isObject(e) && (e = JSON.stringify(e)),
                                                                s.push(o(t) + "=" + o(e));
                                                        }));
                                            }),
                                            (i = s.join("&"));
                                    }
                                    if (i) {
                                        var a = e.indexOf("#"); -
                                        1 !== a && (e = e.slice(0, a)),
                                            (e += (-1 === e.indexOf("?") ? "?" : "&") + i);
                                    }
                                    return e;
                                };
                            },
                            function(e, t, n) {
                                function o() {
                                    this.handlers = [];
                                }
                                var r = n(2);
                                (o.prototype.use = function(e, t) {
                                    return (
                                        this.handlers.push({
                                            fulfilled: e,
                                            rejected: t,
                                        }),
                                        this.handlers.length - 1
                                    );
                                }),
                                (o.prototype.eject = function(e) {
                                    this.handlers[e] && (this.handlers[e] = null);
                                }),
                                (o.prototype.forEach = function(e) {
                                    r.forEach(this.handlers, function(t) {
                                        null !== t && e(t);
                                    });
                                }),
                                (e.exports = o);
                            },
                            function(e, t, n) {
                                function o(e) {
                                    e.cancelToken && e.cancelToken.throwIfRequested();
                                }
                                var r = n(2),
                                    i = n(9),
                                    s = n(10),
                                    a = n(11),
                                    u = n(20),
                                    c = n(21);
                                e.exports = function(e) {
                                    return (
                                        o(e),
                                        e.baseURL && !u(e.url) && (e.url = c(e.baseURL, e.url)),
                                        (e.headers = e.headers || {}),
                                        (e.data = i(e.data, e.headers, e.transformRequest)),
                                        (e.headers = r.merge(
                                            e.headers.common || {},
                                            e.headers[e.method] || {},
                                            e.headers || {}
                                        )),
                                        r.forEach(
                                            [
                                                "delete",
                                                "get",
                                                "head",
                                                "post",
                                                "put",
                                                "patch",
                                                "common",
                                            ],
                                            function(t) {
                                                delete e.headers[t];
                                            }
                                        ),
                                        (e.adapter || a.adapter)(e).then(
                                            function(t) {
                                                return (
                                                    o(e),
                                                    (t.data = i(
                                                        t.data,
                                                        t.headers,
                                                        e.transformResponse
                                                    )),
                                                    t
                                                );
                                            },
                                            function(t) {
                                                return (
                                                    s(t) ||
                                                    (o(e),
                                                        t &&
                                                        t.response &&
                                                        (t.response.data = i(
                                                            t.response.data,
                                                            t.response.headers,
                                                            e.transformResponse
                                                        ))),
                                                    Promise.reject(t)
                                                );
                                            }
                                        )
                                    );
                                };
                            },
                            function(e, t, n) {
                                var o = n(2);
                                e.exports = function(e, t, n) {
                                    return (
                                        o.forEach(n, function(n) {
                                            e = n(e, t);
                                        }),
                                        e
                                    );
                                };
                            },
                            function(e, t) {
                                e.exports = function(e) {
                                    return !(!e || !e.__CANCEL__);
                                };
                            },
                            function(e, t, n) {
                                function o(e, t) {
                                    !r.isUndefined(e) &&
                                        r.isUndefined(e["Content-Type"]) &&
                                        (e["Content-Type"] = t);
                                }
                                var r = n(2),
                                    i = n(12),
                                    s = {
                                        "Content-Type": "application/x-www-form-urlencoded",
                                    },
                                    a = {
                                        adapter: (function() {
                                            var e;
                                            return (
                                                (("undefined" != typeof process &&
                                                        "[object process]" ===
                                                        Object.prototype.toString.call(process)) ||
                                                    "undefined" != typeof XMLHttpRequest) &&
                                                (e = n(13)),
                                                e
                                            );
                                        })(),
                                        transformRequest: [
                                            function(e, t) {
                                                return (
                                                    i(t, "Accept"),
                                                    i(t, "Content-Type"),
                                                    r.isFormData(e) ||
                                                    r.isArrayBuffer(e) ||
                                                    r.isBuffer(e) ||
                                                    r.isStream(e) ||
                                                    r.isFile(e) ||
                                                    r.isBlob(e) ?
                                                    e :
                                                    r.isArrayBufferView(e) ?
                                                    e.buffer :
                                                    r.isURLSearchParams(e) ?
                                                    (o(
                                                            t,
                                                            "application/x-www-form-urlencoded;charset=utf-8"
                                                        ),
                                                        e.toString()) :
                                                    r.isObject(e) ?
                                                    (o(t, "application/json;charset=utf-8"),
                                                        JSON.stringify(e)) :
                                                    e
                                                );
                                            },
                                        ],
                                        transformResponse: [
                                            function(e) {
                                                if ("string" == typeof e)
                                                    try {
                                                        e = JSON.parse(e);
                                                    } catch (e) {}
                                                return e;
                                            },
                                        ],
                                        timeout: 0,
                                        xsrfCookieName: "XSRF-TOKEN",
                                        xsrfHeaderName: "X-XSRF-TOKEN",
                                        maxContentLength: -1,
                                        validateStatus: function(e) {
                                            return e >= 200 && e < 300;
                                        },
                                        headers: {
                                            common: {
                                                Accept: "application/json, text/plain, */*",
                                            },
                                        },
                                    };
                                r.forEach(["delete", "get", "head"], function(e) {
                                        a.headers[e] = {};
                                    }),
                                    r.forEach(["post", "put", "patch"], function(e) {
                                        a.headers[e] = r.merge(s);
                                    }),
                                    (e.exports = a);
                            },
                            function(e, t, n) {
                                var o = n(2);
                                e.exports = function(e, t) {
                                    o.forEach(e, function(n, o) {
                                        o !== t &&
                                            o.toUpperCase() === t.toUpperCase() &&
                                            ((e[t] = n), delete e[o]);
                                    });
                                };
                            },
                            function(e, t, n) {
                                var o = n(2),
                                    r = n(14),
                                    i = n(6),
                                    s = n(17),
                                    a = n(18),
                                    u = n(15);
                                e.exports = function(e) {
                                    return new Promise(function(t, c) {
                                        var f = e.data,
                                            l = e.headers;
                                        o.isFormData(f) && delete l["Content-Type"];
                                        var p = new XMLHttpRequest();
                                        if (e.auth) {
                                            var d = e.auth.username || "",
                                                h = e.auth.password || "";
                                            l.Authorization = "Basic " + btoa(d + ":" + h);
                                        }
                                        if (
                                            (p.open(
                                                    e.method.toUpperCase(),
                                                    i(e.url, e.params, e.paramsSerializer), !0
                                                ),
                                                (p.timeout = e.timeout),
                                                (p.onreadystatechange = function() {
                                                    if (
                                                        p &&
                                                        4 === p.readyState &&
                                                        (0 !== p.status ||
                                                            (p.responseURL &&
                                                                0 === p.responseURL.indexOf("file:")))
                                                    ) {
                                                        var n =
                                                            "getAllResponseHeaders" in p ?
                                                            s(p.getAllResponseHeaders()) :
                                                            null,
                                                            o = {
                                                                data: e.responseType && "text" !== e.responseType ?
                                                                    p.response : p.responseText,
                                                                status: p.status,
                                                                statusText: p.statusText,
                                                                headers: n,
                                                                config: e,
                                                                request: p,
                                                            };
                                                        r(t, c, o), (p = null);
                                                    }
                                                }),
                                                (p.onabort = function() {
                                                    p &&
                                                        (c(u("Request aborted", e, "ECONNABORTED", p)),
                                                            (p = null));
                                                }),
                                                (p.onerror = function() {
                                                    c(u("Network Error", e, null, p)), (p = null);
                                                }),
                                                (p.ontimeout = function() {
                                                    c(
                                                            u(
                                                                "timeout of " + e.timeout + "ms exceeded",
                                                                e,
                                                                "ECONNABORTED",
                                                                p
                                                            )
                                                        ),
                                                        (p = null);
                                                }),
                                                o.isStandardBrowserEnv())
                                        ) {
                                            var m = n(19),
                                                v =
                                                (e.withCredentials || a(e.url)) && e.xsrfCookieName ?
                                                m.read(e.xsrfCookieName) :
                                                void 0;
                                            v && (l[e.xsrfHeaderName] = v);
                                        }
                                        if (
                                            ("setRequestHeader" in p &&
                                                o.forEach(l, function(e, t) {
                                                    void 0 === f && "content-type" === t.toLowerCase() ?
                                                        delete l[t] :
                                                        p.setRequestHeader(t, e);
                                                }),
                                                e.withCredentials && (p.withCredentials = !0),
                                                e.responseType)
                                        )
                                            try {
                                                p.responseType = e.responseType;
                                            } catch (t) {
                                                if ("json" !== e.responseType) throw t;
                                            }
                                        "function" == typeof e.onDownloadProgress &&
                                            p.addEventListener("progress", e.onDownloadProgress),
                                            "function" == typeof e.onUploadProgress &&
                                            p.upload &&
                                            p.upload.addEventListener(
                                                "progress",
                                                e.onUploadProgress
                                            ),
                                            e.cancelToken &&
                                            e.cancelToken.promise.then(function(e) {
                                                p && (p.abort(), c(e), (p = null));
                                            }),
                                            void 0 === f && (f = null),
                                            p.send(f);
                                    });
                                };
                            },
                            function(e, t, n) {
                                var o = n(15);
                                e.exports = function(e, t, n) {
                                    var r = n.config.validateStatus;
                                    !r || r(n.status) ?
                                        e(n) :
                                        t(
                                            o(
                                                "Request failed with status code " + n.status,
                                                n.config,
                                                null,
                                                n.request,
                                                n
                                            )
                                        );
                                };
                            },
                            function(e, t, n) {
                                var o = n(16);
                                e.exports = function(e, t, n, r, i) {
                                    var s = new Error(e);
                                    return o(s, t, n, r, i);
                                };
                            },
                            function(e, t) {
                                e.exports = function(e, t, n, o, r) {
                                    return (
                                        (e.config = t),
                                        n && (e.code = n),
                                        (e.request = o),
                                        (e.response = r),
                                        (e.isAxiosError = !0),
                                        (e.toJSON = function() {
                                            return {
                                                message: this.message,
                                                name: this.name,
                                                description: this.description,
                                                number: this.number,
                                                fileName: this.fileName,
                                                lineNumber: this.lineNumber,
                                                columnNumber: this.columnNumber,
                                                stack: this.stack,
                                                config: this.config,
                                                code: this.code,
                                            };
                                        }),
                                        e
                                    );
                                };
                            },
                            function(e, t, n) {
                                var o = n(2),
                                    r = [
                                        "age",
                                        "authorization",
                                        "content-length",
                                        "content-type",
                                        "etag",
                                        "expires",
                                        "from",
                                        "host",
                                        "if-modified-since",
                                        "if-unmodified-since",
                                        "last-modified",
                                        "location",
                                        "max-forwards",
                                        "proxy-authorization",
                                        "referer",
                                        "retry-after",
                                        "user-agent",
                                    ];
                                e.exports = function(e) {
                                    var t,
                                        n,
                                        i,
                                        s = {};
                                    return e ?
                                        (o.forEach(e.split("\n"), function(e) {
                                                if (
                                                    ((i = e.indexOf(":")),
                                                        (t = o.trim(e.substr(0, i)).toLowerCase()),
                                                        (n = o.trim(e.substr(i + 1))),
                                                        t)
                                                ) {
                                                    if (s[t] && r.indexOf(t) >= 0) return;
                                                    s[t] =
                                                        "set-cookie" === t ?
                                                        (s[t] ? s[t] : []).concat([n]) :
                                                        s[t] ?
                                                        s[t] + ", " + n :
                                                        n;
                                                }
                                            }),
                                            s) :
                                        s;
                                };
                            },
                            function(e, t, n) {
                                var o = n(2);
                                e.exports = o.isStandardBrowserEnv() ?
                                    (function() {
                                        function e(e) {
                                            var t = e;
                                            return (
                                                n && (r.setAttribute("href", t), (t = r.href)),
                                                r.setAttribute("href", t), {
                                                    href: r.href,
                                                    protocol: r.protocol ?
                                                        r.protocol.replace(/:$/, "") : "",
                                                    host: r.host,
                                                    search: r.search ?
                                                        r.search.replace(/^\?/, "") : "",
                                                    hash: r.hash ? r.hash.replace(/^#/, "") : "",
                                                    hostname: r.hostname,
                                                    port: r.port,
                                                    pathname: "/" === r.pathname.charAt(0) ?
                                                        r.pathname : "/" + r.pathname,
                                                }
                                            );
                                        }
                                        var t,
                                            n = /(msie|trident)/i.test(navigator.userAgent),
                                            r = document.createElement("a");
                                        return (
                                            (t = e(window.location.href)),
                                            function(n) {
                                                var r = o.isString(n) ? e(n) : n;
                                                return (
                                                    r.protocol === t.protocol && r.host === t.host
                                                );
                                            }
                                        );
                                    })() :
                                    function() {
                                        return !0;
                                    };
                            },
                            function(e, t, n) {
                                var o = n(2);
                                e.exports = o.isStandardBrowserEnv() ? {
                                    write: function(e, t, n, r, i, s) {
                                        var a = [];
                                        a.push(e + "=" + encodeURIComponent(t)),
                                            o.isNumber(n) &&
                                            a.push("expires=" + new Date(n).toGMTString()),
                                            o.isString(r) && a.push("path=" + r),
                                            o.isString(i) && a.push("domain=" + i), !0 === s && a.push("secure"),
                                            (document.cookie = a.join("; "));
                                    },
                                    read: function(e) {
                                        var t = document.cookie.match(
                                            new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")
                                        );
                                        return t ? decodeURIComponent(t[3]) : null;
                                    },
                                    remove: function(e) {
                                        this.write(e, "", Date.now() - 864e5);
                                    },
                                } : {
                                    write: function() {},
                                    read: function() {
                                        return null;
                                    },
                                    remove: function() {},
                                };
                            },
                            function(e, t) {
                                e.exports = function(e) {
                                    return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e);
                                };
                            },
                            function(e, t) {
                                e.exports = function(e, t) {
                                    return t ?
                                        e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") :
                                        e;
                                };
                            },
                            function(e, t, n) {
                                var o = n(2);
                                e.exports = function(e, t) {
                                    t = t || {};
                                    var n = {};
                                    return (
                                        o.forEach(
                                            ["url", "method", "params", "data"],
                                            function(e) {
                                                void 0 !== t[e] && (n[e] = t[e]);
                                            }
                                        ),
                                        o.forEach(["headers", "auth", "proxy"], function(r) {
                                            o.isObject(t[r]) ?
                                                (n[r] = o.deepMerge(e[r], t[r])) :
                                                void 0 !== t[r] ?
                                                (n[r] = t[r]) :
                                                o.isObject(e[r]) ?
                                                (n[r] = o.deepMerge(e[r])) :
                                                void 0 !== e[r] && (n[r] = e[r]);
                                        }),
                                        o.forEach(
                                            [
                                                "baseURL",
                                                "transformRequest",
                                                "transformResponse",
                                                "paramsSerializer",
                                                "timeout",
                                                "withCredentials",
                                                "adapter",
                                                "responseType",
                                                "xsrfCookieName",
                                                "xsrfHeaderName",
                                                "onUploadProgress",
                                                "onDownloadProgress",
                                                "maxContentLength",
                                                "validateStatus",
                                                "maxRedirects",
                                                "httpAgent",
                                                "httpsAgent",
                                                "cancelToken",
                                                "socketPath",
                                            ],
                                            function(o) {
                                                void 0 !== t[o] ?
                                                    (n[o] = t[o]) :
                                                    void 0 !== e[o] && (n[o] = e[o]);
                                            }
                                        ),
                                        n
                                    );
                                };
                            },
                            function(e, t) {
                                function n(e) {
                                    this.message = e;
                                }
                                (n.prototype.toString = function() {
                                    return "Cancel" + (this.message ? ": " + this.message : "");
                                }),
                                (n.prototype.__CANCEL__ = !0),
                                (e.exports = n);
                            },
                            function(e, t, n) {
                                function o(e) {
                                    if ("function" != typeof e)
                                        throw new TypeError("executor must be a function.");
                                    var t;
                                    this.promise = new Promise(function(e) {
                                        t = e;
                                    });
                                    var n = this;
                                    e(function(e) {
                                        n.reason || ((n.reason = new r(e)), t(n.reason));
                                    });
                                }
                                var r = n(23);
                                (o.prototype.throwIfRequested = function() {
                                    if (this.reason) throw this.reason;
                                }),
                                (o.source = function() {
                                    var e;
                                    return {
                                        token: new o(function(t) {
                                            e = t;
                                        }),
                                        cancel: e,
                                    };
                                }),
                                (e.exports = o);
                            },
                            function(e, t) {
                                e.exports = function(e) {
                                    return function(t) {
                                        return e.apply(null, t);
                                    };
                                };
                            },
                        ]);
                    }),
                    "object" == a(t) && "object" == a(e) ?
                        (e.exports = s()) :
                        ((r = []),
                            void 0 ===
                            (i = "function" == typeof(o = s) ? o.apply(t, r) : o) ||
                            (e.exports = i));
                },
                352: (e, t, n) => {
                    t.default = void 0;
                    var o = n(35),
                        r = s(n(627)),
                        i = s(n(88));

                    function s(e) {
                        return e && e.__esModule ?
                            e : {
                                default: e,
                            };
                    }

                    function a(e) {
                        return (a =
                            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ?

                            function(e) {
                                return typeof e;
                            } :
                            function(e) {
                                return e &&
                                    "function" == typeof Symbol &&
                                    e.constructor === Symbol &&
                                    e !== Symbol.prototype ?
                                    "symbol" :
                                    typeof e;
                            })(e);
                    }

                    function u(e, t) {
                        for (var n = 0; n < t.length; n++) {
                            var o = t[n];
                            (o.enumerable = o.enumerable || !1),
                            (o.configurable = !0),
                            "value" in o && (o.writable = !0),
                                Object.defineProperty(e, o.key, o);
                        }
                    }
                    var c = (function() {
                        function e() {
                            !(function(e, t) {
                                if (!(e instanceof t))
                                    throw new TypeError("Cannot call a class as a function");
                            })(this, e),
                            (this.player = null),
                            (this.isPause = !0),
                            (this.codec = 0),
                            (this.codec1 = 1),
                            (this.codec2 = 2),
                            (this.codec4 = 4),
                            (this.autoplay = 1),
                            (this.canvasWidth = 0),
                            (this.canvasHeight = 0),
                            (this.play_token = ""),
                            (this.server_ip = ""),
                            (this.url = ""),
                            (this.appid = "yuanliu"),
                            (this.appsecret = "9cf9008f40a95642be42d1b99055fe55"),
                            (this.ios264_playStart = !1),
                            (this.timer = ""),
                            (this.ws = null),
                            (this.commands = {
                                reverse: [14, 1, 0],
                                light_on: [11, 1, 1],
                                light_off: [11, 1, 2],
                                light_auto: [11, 1, 3],
                                spin_top: [15, 2, 1, 1],
                                spin_left: [15, 2, 2, 1],
                                spin_bottom: [15, 2, 4, 1],
                                spin_right: [15, 2, 8, 1],
                            });
                        }
                        var t, n;
                        return (
                            (t = e),
                            (n = [{
                                    key: "init",
                                    value: function(e, t, n) {
                                        var o =
                                            arguments.length > 3 && void 0 !== arguments[3] ?
                                            arguments[3] :
                                            0,
                                            r =
                                            arguments.length > 4 && void 0 !== arguments[4] ?
                                            arguments[4] :
                                            0;
                                        if (
                                            ((this.codec = e),
                                                (this.server_ip = t),
                                                (this.play_token = n),
                                                (this.canvasWidth = o),
                                                (this.canvasHeight = r),
                                                1 == e)
                                        )
                                            this.url = "https://"
                                            .concat(t, ":8813/flv/preview/")
                                            .concat(n, "/live.flv");
                                        else if (2 == e) {
                                            if (!this.isSupportAssembly()) return;
                                            this.url = "https://"
                                                .concat(t, ":8813/flv/preview/")
                                                .concat(n, "/live.flv");
                                        } else
                                            4 == e &&
                                            (this.url = "wss://"
                                                .concat(this.server_ip, ":8813/mjpeg/preview/")
                                                .concat(res.play_token, "/live.mjpeg"));
                                        // return this.keepAlive(), this;
                                        return this.keepAlive(), this.wsInit(), this;
                                    },
                                },
                                {
                                    key: "wsInit",
                                    value: function() {
                                        "WebSocket" in window &&
                                            (this.ws && this.ws.close(),
                                                (this.ws = new WebSocket(
                                                    "wss://" +
                                                    this.server_ip +
                                                    ":8813/api/v1/preview/control/" +
                                                    this.play_token
                                                )),
                                                (this.ws.onopen = function() {
                                                    console.log("websocket已连接");
                                                }),
                                                (this.ws.onmessage = function(e) {
                                                    e.data, console.log("数据已接收...");
                                                }),
                                                (this.ws.onclose = function() {
                                                    console.log("连接已关闭...");
                                                }));
                                    },
                                },
                                {
                                    key: "sendCommand",
                                    value: function(e) {
                                        if ("WebSocket" in window) {
                                            if (-1 === [
                                                    "reverse",
                                                    "light_on",
                                                    "light_off",
                                                    "light_auto",
                                                    "spin_top",
                                                    "spin_left",
                                                    "spin_bottom",
                                                    "spin_right",
                                                ].indexOf(e))
                                                return void console.log("不支持的云台指令");
                                            var t = [];
                                            switch (e) {
                                                case "reverse":
                                                    t = this.commands.reverse;
                                                    break;
                                                case "light_on":
                                                    t = this.commands.light_on;
                                                    break;
                                                case "light_off":
                                                    t = this.commands.light_off;
                                                    break;
                                                case "light_auto":
                                                    t = this.commands.light_auto;
                                                    break;
                                                case "spin_top":
                                                    t = this.commands.spin_top;
                                                    break;
                                                case "spin_left":
                                                    t = this.commands.spin_left;
                                                    break;
                                                case "spin_bottom":
                                                    t = this.commands.spin_bottom;
                                                    break;
                                                case "spin_right":
                                                    t = this.commands.spin_right;
                                            }
                                            for (
                                                var n = new Uint8Array(t.length), o = 0; o < t.length; o++
                                            )
                                                n[o] = t[o];
                                            this.ws && this.wsSend(n.buffer);
                                        } else
                                            console.log("您的浏览器不支持WebSocket，不支持云台控制");
                                    },
                                },
                                {
                                    key: "wsSend",
                                    value: function(e) {
                                        this.ws.send(e);
                                    },
                                },
                                {
                                    key: "callbackfun",
                                    value: function(e) {
                                        "play_start2" === e && (this.ios264_playStart = !0),
                                            console.log(e);
                                    },
                                },
                                {
                                    key: "isSupportAssembly",
                                    value: function() {
                                        var e = (function() {
                                            try {
                                                if (
                                                    "object" ===
                                                    ("undefined" == typeof WebAssembly ?
                                                        "undefined" :
                                                        a(WebAssembly)) &&
                                                    "function" == typeof WebAssembly.instantiate
                                                ) {
                                                    var e = new WebAssembly.Module(
                                                        Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0)
                                                    );
                                                    if (e instanceof WebAssembly.Module)
                                                        return (
                                                            new WebAssembly.Instance(e) instanceof WebAssembly.Instance
                                                        );
                                                }
                                            } catch (e) {}
                                            return !1;
                                        })();
                                        return (
                                            console.log(
                                                e ?
                                                "WebAssembly is supported" :
                                                "WebAssembly is not supported"
                                            ),
                                            e
                                        );
                                    },
                                },
                                {
                                    key: "play",
                                    value: function(dom, bl) {
                                        return new Promise((resolve, reject) => {
                                            console.log(dom, "dom");
                                            this.isPause &&
                                                ((this.isPause = !1),
                                                    this.codec == this.codec1 || this.codec == this.codec2 ?
                                                    ((this.player = new r.default(
                                                            null,
                                                            dom,
                                                            this.callbackfun, {
                                                                cbUserPtr: this,
                                                                decodeType: "auto",
                                                                openAudio: 0,
                                                                BigPlay: !1,
                                                                Height: !0,
                                                            }
                                                        )),
                                                        this.player.play(this.url, this.autoplay)) :
                                                    this.codec == this.codec4 &&
                                                    ((this.player = new i.default(
                                                            "canvas",
                                                            this.url,
                                                            this.canvasWidth,
                                                            this.canvasHeight
                                                        )),
                                                        this.player.play()),
                                                    this.keepAlive());
                                            if (bl) {
                                                this.isPause = true;
                                            }
                                            resolve();
                                        });
                                    },
                                },
                                {
                                    key: "stop",
                                    value: function() {
                                        this.isPause ||
                                            ((this.isPause = !0),
                                                this.codec == this.codec1 || this.codec == this.codec2 ?
                                                this.player.stop() :
                                                this.codec == this.codec4 && this.player.pause(),
                                                this.keepAlive());
                                    },
                                },
                                {
                                    key: "keepAlive",
                                    value: function() {
                                        var e = this;
                                        this.isPause ?
                                            (this.timer = setInterval(function() {
                                                e.heartBeat();
                                            }, 1e4)) :
                                            (clearInterval(this.timer), (this.timer = ""));
                                    },
                                },
                                {
                                    key: "showLoading",
                                    value: function() {
                                        if (this.codec == this.codec2 || this.ios264_playStart) {
                                            var e = document.getElementsByTagName("canvas");
                                            return (
                                                (t = e.length) > 1 &&
                                                Array.from(e).forEach(function(n, o) {
                                                    t - 1 != o && e[o].remove();
                                                }),
                                                null ===
                                                (e =
                                                    document.getElementsByTagName(
                                                        "canvas"
                                                    ))[0].getAttribute("width")
                                            );
                                        }
                                        if (this.codec == this.codec1) {
                                            var t,
                                                n = document.getElementsByTagName("video");
                                            return "100%" != n[(t = n.length) - 1].style.width;
                                        }
                                    },
                                },
                                {
                                    key: "requestPlayAddress",
                                    value: function(e, t, n) {
                                        var r = this,
                                            i =
                                            arguments.length > 3 && void 0 !== arguments[3] ?
                                            arguments[3] :
                                            0;
                                        return new Promise(function(s, a) {
                                            (0, o.getPlayAddress)({
                                                token: e,
                                                device_id: t,
                                                pq: i,
                                                server_ip: n,
                                                appid: r.appid,
                                                appsecret: r.appsecret,
                                            })
                                            .then(function(e) {
                                                    s(e);
                                                })
                                                .catch(function(e) {
                                                    a(e);
                                                });
                                        });
                                    },
                                },
                                {
                                    key: "requestDevicesStatus",
                                    value: function(e, t) {
                                        return new Promise(function(n, r) {
                                            (0, o.getDevicesStatus)(
                                                JSON.stringify({
                                                    dev_id: e,
                                                    ts: parseInt(new Date().getTime() / 1e3),
                                                }),
                                                "https://" + t + ":8813/api/v1/check_online"
                                            )
                                            .then(function(e) {
                                                    n(e);
                                                })
                                                .catch(function(e) {
                                                    r(e);
                                                });
                                        });
                                    },
                                },
                                {
                                    key: "heartBeat",
                                    value: function(e, t) {
                                        var n = this;
                                        return new Promise(function(e, t) {
                                            (0, o.heartBeat)(
                                                JSON.stringify({
                                                    play_token: n.play_token,
                                                }),
                                                "https://" + n.server_ip + ":8813/flv/heartbeat"
                                            )
                                            .then(function(t) {
                                                    e(t);
                                                })
                                                .catch(function(e) {
                                                    t(e);
                                                });
                                        });
                                    },
                                },
                                {
                                    key: "login",
                                    value: function(e, t) {
                                        var n = this;
                                        return new Promise(function(r, i) {
                                            (0, o.login)({
                                                username: e,
                                                password: t,
                                                appid: n.appid,
                                                appsecret: n.appsecret,
                                            })
                                            .then(function(e) {
                                                    r(e);
                                                })
                                                .catch(function(e) {
                                                    i(e);
                                                });
                                        });
                                    },
                                },
                                {
                                    key: "getDeviceList",
                                    value: function(e) {
                                        var t = this;
                                        return new Promise(function(n, r) {
                                            (0, o.getDeviceList)({
                                                token: e,
                                                appid: t.appid,
                                                appsecret: t.appsecret,
                                            })
                                            .then(function(e) {
                                                    n(e);
                                                })
                                                .catch(function(e) {
                                                    r(e);
                                                });
                                        });
                                    },
                                },
                                {
                                    key: "loginOut",
                                    value: function(e) {
                                        var t = this;
                                        return new Promise(function(n, r) {
                                            (0, o.loginOut)({
                                                token: e,
                                                appid: t.appid,
                                                appsecret: t.appsecret,
                                            })
                                            .then(function(e) {
                                                    n(e);
                                                })
                                                .catch(function(e) {
                                                    r(e);
                                                });
                                        });
                                    },
                                },
                            ]) && u(t.prototype, n),
                            e
                        );
                    })();
                    t.default = c;
                },
                88: (e, t) => {
                    Object.defineProperty(t, "__esModule", {
                            value: !0,
                        }),
                        (t.default = void 0);
                    t.default = function e(t, n, o, r) {
                        var i = e.prototype,
                            s = o,
                            a = r,
                            u = document.getElementById(t),
                            c = u.getContext("2d");
                        (u.width = s), (u.height = a);
                        var f = !1,
                            l = new Image();
                        l.onload = function(e) {
                            f && c.drawImage(l, 0, 0, s, a);
                        };
                        var p = this;
                        (i.arrayBufferToBase64 = function(e) {
                            for (
                                var t = "", n = new Uint8Array(e), o = n.byteLength, r = 0; r < o; r++
                            )
                                t += String.fromCharCode(n[r]);
                            return window.btoa(t);
                        }),
                        (i.onConnected = function() {
                            console.info("CONNECTED");
                        }),
                        (i.onDisconnected = function() {
                            console.info("DISCONNECTED");
                        }),
                        (i.onError = function(e) {
                            console.info("error");
                        }),
                        (i.onReceive = function(e, t) {
                            f &&
                                11 == new Uint8Array(e)[0] &&
                                (l.src =
                                    "data:image/jpeg;base64," +
                                    t.arrayBufferToBase64(e.slice(5)));
                        });
                        var d = null;
                        (i.newWebSocket = function(e, t) {
                            return (
                                ((d = new WebSocket(e)).binaryType = "arraybuffer"),
                                (d.onopen = function(e) {
                                    t.onConnected();
                                }),
                                (d.onclose = function(e) {
                                    t.onDisconnected();
                                }),
                                (d.onerror = function(e) {
                                    t.onError(e);
                                }),
                                (d.onmessage = function(e) {
                                    e.data instanceof ArrayBuffer && t.onReceive(e.data, t);
                                }),
                                d
                            );
                        }),
                        (i.play = function() {
                            (f = !0), null == d && this.newWebSocket(n, p);
                        }),
                        (i.pause = function() {
                            (f = !1), d.close();
                        });
                    };
                },
                278: (e, t, n) => {
                    var o;
                    Object.defineProperty(t, "__esModule", {
                            value: !0,
                        }),
                        (t.default = void 0);
                    var r = (
                        (o = n(111)) && o.__esModule ?
                        o : {
                            default: o,
                        }
                    ).default.create({
                        timeout: 15e3,
                    });
                    r.interceptors.request.use(
                            function(e) {
                                return e;
                            },
                            function(e) {
                                return console.log(e), Promise.reject();
                            }
                        ),
                        r.interceptors.response.use(
                            function(e) {
                                if (200 === e.status) return e.data;
                                Promise.reject();
                            },
                            function(e) {
                                return Promise.reject(e);
                            }
                        );
                    var i = r;
                    t.default = i;
                },
                627: (t) => {
                    t.exports = e;
                },
            },
            n = {};

        function o(e) {
            if (n[e]) return n[e].exports;
            var r = (n[e] = {
                id: e,
                loaded: !1,
                exports: {},
            });
            return t[e](r, r.exports, o), (r.loaded = !0), r.exports;
        }
        return (
            (o.nmd = (e) => ((e.paths = []), e.children || (e.children = []), e)),
            o(352)
        );
    })().default;
});